import java.util.ArrayList;
import java.util.Scanner;
public class SchoolSystem implements ISignUp{
    int Big,Med,Small;
 SchoolSystem(int a,int b,int c){
        this.Big=a;
        this.Med=b;
        this.Small=c;
    }
    public void addStudent(int stuType){
     if(stuType==1){

         if(Big>0){
         System.out.print("true");
             Big--;}
         else{
             System.out.print("false");
         }

     }

        if(stuType==2){

            if(Med>0){
            System.out.print("true");
                Med--;}
            else{
                System.out.print("false");
            }

        }

        if(stuType==3){

            if(Small>0){
                System.out.print("true");
                Small--;}
            else{
                System.out.print("false");
            }

        }


    }
    public void print(){
    System.out.print("null");
    }
    public int getBig(){
        return Big;
    }

    public int getMedium(){
        return Med;
    }
    public int getSmall(){
        return Small;
    }





    public static void main(String args[]) throws Exception{
        Scanner reader =new Scanner(System.in);
        String in=reader.nextLine();
        String regex3="\\s";
        String digitWord[]=in.split(regex3);
        String regex="SchoolSystem";
        String regex1="addStudent";
        for(int i=0;i<digitWord.length;i++)
        if(digitWord[i].matches(regex)){
         int in2 = reader.nextInt();
            int in3 = reader.nextInt();
            int in4 = reader.nextInt();
            SchoolSystem sc = new SchoolSystem(in2, in3, in4);

            ArrayList<Integer> plan = new ArrayList<Integer>();
            for(int j=0;j<digitWord.length;j++)
            if(digitWord[j].matches(regex1)) {
                int IN[] = new int[digitWord.length-1];
                for (int a = 0; a < IN.length;a++) {
                    IN[a] = reader.nextInt();
                }
                for (int b = 0; b < IN.length; b++) {
                    plan.add(IN[b]);
                }
                sc.print();
                for (int c = 0; c < plan.size(); c++) {

                   sc.addStudent(plan.get(c));
                }
            }
// 第一次修改
        }

    }
}
